package com.kfh.ybracelet.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Aaron on 16/1/27.
 */
public class BitmapEntity implements Parcelable {

    public float x;
    public float y;
    public float width;
    public float height;
    public int devide = 1;
    public int index = -1;

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeFloat(this.x);
        dest.writeFloat(this.y);
        dest.writeFloat(this.width);
        dest.writeFloat(this.height);
        dest.writeInt(this.index);
    }

    public BitmapEntity() {
    }

    protected BitmapEntity(Parcel in) {
        this.x = in.readFloat();
        this.y = in.readFloat();
        this.width = in.readFloat();
        this.height = in.readFloat();
        this.index = in.readInt();
    }

    public static final Creator<BitmapEntity> CREATOR = new Creator<BitmapEntity>() {
        public BitmapEntity createFromParcel(Parcel source) {
            return new BitmapEntity(source);
        }

        public BitmapEntity[] newArray(int size) {
            return new BitmapEntity[size];
        }
    };
}
